/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86155
 * date: 2024-03-09
 * Time: 16:54
 *
 * @author
 */
//静态内部类
    class Person{
        public int age = 20;
        public String name = "bit";


        public void get(){
            System.out.println("name = "+name +"age = "+age);
        }

    @Override//称为注解   //起到检查作用
    public String toString() {
        return
                "age=" + age +
                ", name='" + name
                ;
    }
}
public class Test2 {
    public static void main(String[] args) {
        Person person = new Person();
        //person.get();
        System.out.println(person);
    }
    public static void main1(String[] args) {
        //如何获取静态内部类对象
        Iner.Innner innner = new Iner.Innner();
        innner.fuunc();
    }
}

    class Iner{
        public int date1 =1;
        int date2 = 2;
        public static int date3 = 3;

        public void test(){
            System.out.println("test()");
        }

        static class Innner{
            public int date4 =4;
            int date5 = 5;
            public static int date6 = 6;

            public void fuunc(){
                System.out.println("静态内部类");
                Iner iner = new Iner();
                System.out.println(iner.date1);
                System.out.println(iner.date2);
                System.out.println(date3);
                System.out.println(date4);
                System.out.println(date5);
                System.out.println(date6);
            }
        }
}



